Skip to content

refactor: drop dead query local assignments in resources#21

Open
mokevnin wants to merge 1 commit into
mainfrom
fix/remove-dead-query-assignments
Open

refactor: drop dead query local assignments in resources#21
mokevnin wants to merge 1 commit into
mainfrom
fix/remove-dead-query-assignments

Conversation

@mokevnin

Copy link
Copy Markdown
Member

CI lint went red after the Stainless migration surfaced normal in-repo CI: RuboCop Lint/UselessAssignment for query in 5 resource methods.

In image build/image pull, plugin pull/plugin upgrade and service update, the generated code assigns query = DockerEngineRuby::Internal::Util.encode_query_params(parsed) but the @client.request(...) call builds its query inline (query: parsed.slice(*query_params)...), so the query local is never read.

Removed the 5 dead assignments. No behavior change — those endpoints still send their query params. ./scripts/lint (RuboCop + Sorbet) and ./scripts/test (182 runs, 0 failures) are green.

🤖 Generated with Claude Code

Five resource methods (image build/pull, plugin pull/upgrade, service update)
assigned `query = encode_query_params(parsed)` but built the request query
inline via `parsed.slice(*query_params)`, leaving the local unused. RuboCop
flagged Lint/UselessAssignment, failing CI. Remove the dead assignments — no
behavior change, the requests already send their query params.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant